Sunday, May 25, 2008

SofSW: The SW Basics (6/6)

The Sleeping Girl has risen and is looking around disoriented. She’s in a park under a tree with a light breeze blowing. Kids are playing football with their shirts as goal posts, their happy voices echo through the air. A bird, perhaps a robin, sings on the tree. She feels happy, it is safe here and although she’s tired, she feels pure bliss just lying there on the blanket. Her picnic basket is next to her, there are no ants crawling on her half-eaten sandwich. Her boyfriend has gone to fetch a corkscrew from the car parked out of sight. She can’t believe this place is right in the middle of the busy city. It is so tranquil compared to the middle-city hectic she has to endure every day. Wake up in the morning much too early, take a quick shower, put on some make-up, grab a busy cup of coffee and run for the bus. Catching the bus gets her on time for the underground station overcrowded with similar people heading for their offices. After a trip on the underground that is too short to fall asleep but too long not to be bored, she has to join the March of the Sardines. Every last one of them gets out of the tin can on the central station and they head in unison up towards the ground level. The wind of the tunnels pulls her to a semi-woken state, but all she sees around her are heads with cold and expressionless fish eyes. There are no smiles, no grins, not even frowns, just dead fish faces. Every morning.

The noise becomes louder and louder as the school approaches the ground. On the street the noise is unbearable. Before crossing the street, she looks to the right, there are no cars coming, only benches. The benches are not moving. She turns her head, there’s more benches on her left, still no cars. She’s not standing at a city street at all, she’s sitting on a bench. There’s a man looking at me, she thinks and suddenly she’s wide awake.

This is the airport.

Labels:

Saturday, March 29, 2008

SofSW: The SW Basics (4/6)

The arrow pointed this way, I’m sure of it. But this is a long corridor and there have been at least open doorways leading to the right from here. Should I have taken one of them? What if I’m headed the wrong way? This corridor ends soon and there’s a sign saying “Security Check”. I’m still on the right track. I climb the stairs as the escalator seems to be out of order. There’s a red light, you see. That’s a sign that the escalator won’t work, or it would only go in the opposite direction. Some escalators can go up or down at a moment’s notice. They have a blue sign with an inviting arrow showing the currently available direction. I’ve sometimes wondered what happens if people enter the escalator at exactly the same time from both directions. Will the one wanting to come up win, which made more sense than the other direction? But there is also the third option, instead of choosing up or down, the escalator can decide not to move at all. I’ve seen escalators in America with signs saying “use stairs when escalator not moving”. My first thought was that isn’t a stopped escalator a staircase, but in the promised land of lawsuits it can be too dangerous to be climbing on a stopped escalator, which suddenly surges into action.

I’m glad I don’t have my suitcase to drag up these stairs anymore. There’s a uniformed man sitting on a chair at the top of the stairs. He’s reading a leaflet, looking bored. Behind him on the wall is a sign. From this distance I can barely make out what it says: “Be sure not have any fluids in your bag. Mass isn’t mental. For your security.” For greater security the man looks up from his leaflet as I am about to pass him and asks if I’m carrying any liquids. I shake my head and head towards the security check queues I see through the glass wall.

There are twelve security gates, but seven of them are not in use. Red signs above them show that the gates are closed. Five gates show green light and there’s a lot of action. Uniformed officials accept bags on to the line moving through the X-ray machine. One official is staring at the monitor trying visually to locate suspicious shapes of metal or other visible materials. A man and a woman stand ready on the other side of the metal detector holding handheld detectors. I don’t normally have to be searched because I don’t beep, but I’ve seen days when everybody beeps, just in case. Such days can’t happen too often, otherwise the officials and the travelers would lose their trust in these devices. I think the sensitivity of the metal detectors is randomly adjusted all the time so that at least all bigger metal effects are detected, but sometimes you’ll beep if you have liver pâté on your morning toast.

I’ve seen people get into trouble for pens that contain liquid ink. Do I have any of those? What if they stop me and search my bag? I don’t want to explain anything. I need to get to a quiet place and follow my thoughts. Otherwise I’ll lose my train of thought, possibly forever. Immature ideas are like beautiful butterflies, if you want to keep them, you’ll have to catch them to moment you realize they are there. Good ideas are rare too. Why can’t I just put my bag and jacket on the belt and walk through the metal detector unbeeping and be left alone? I have put every last metallic object in my jacket pockets, so I wouldn’t beep. I’ll even remove my belt to be sure. Oops, my notepad and a pen are still in my back pocket. I’d better put them in the jacket pocket. That was close! Have I forgotten anything else?

Gases have been always banned from airplanes, and since end of 2001, liquids are banned too. Metallic objects are detected and checked, and the rest of the hand luggage is X-rayed. Even solids are checked. There’s some security holes left in the system, though. There’s at least one huge one, the human body. Diseases are a threat in a world where people can move from one place to another quickly and without worrying about the distance. Epidemics have no boundaries anymore. In the medieval cities, the town wall could protect the people inside or outside. It formed an obstacle for the spreading of black plague. Nowadays, you might be infected in Africa and be in North America before you know it. Epidemics could spread like this very widely, even without evil intent. But if you add some planning into the picture, you’ll realize how antiquated the security systems at airports really are.

It’s my turn now. I put my bag on the line and open it to reveal the laptop I’m carrying. Earlier you had to turn the laptop on, now it is no longer necessary. I take off my coat and place it in the empty tray the official moves next to the tray containing my open bag with the laptop. He asks me to empty my pant pockets for any metals and I shake my head and walk through the large arch of the metal detector. Every fiber of my body is tense and aim at the middle of the detector, there’s less chance of beeping if you don’t hit the sides of the device. No beep. I let out a sigh of relief but not too obviously to not raise suspicions. My bag has gone through the X-ray scanner, I close the bag and take my jacket, which hasn’t caused anything out of the ordinary either. With all my things I head for my gate.

There’s a café here. Should I eat something? If I eat now, the meal on the plane will be wasted. I decide to wait, although I am feeling slightly hungry. A beer might relieve my tension and ease my hunger too. No, better not, even one beer can mess my thinking. I won’t know if I’m on the right track, because with beer almost anything seems like a good idea. Not all my ideas are good, I know that much. This time I fight off the temptation, a double temptation to be exact. I won’t eat anything yet and I won’t drink any alcohol. Should I buy a drink still to ease the hunger? I could have a Coke or some juice. The queue of people with trays full of sandwiches, pints of beer and cups of coffee makes the decision for me. I head for the gate and hope that there are not too many people there. Best would be to find just a few sleepers, because you’ll never find a completely empty waiting area. There’s always somebody waiting, at the dentist’s, in police offices, in the car registration office, you’ll never find a supermarket with nobody queueing. A couple of people sleeping this early in the morning would mean that they are totally exhausted from jet lag and wouldn’t be able to disturb me anytime soon. I hope for sleepers, because it can’t be empty.
What if my gate’s full of people? Will I find a quieter gate?

Labels:

Thursday, March 20, 2008

SofSW: The SW Basics (3/6)

The gate is quiet. There’s nobody standing behind the desk yet. The monitor above it reads my flight details. No other plane is using this gate before mine. The benches nearby are almost empty. There’s a girl lying on her back with her head against her backpack two rows ahead of me. She has her eyes closed and is taking long deep breaths. Clearly she’s asleep. A man is curled on his side on the next bench row reserving three benches at once. The fetal position seems comfortable and the blissfully peaceful look on his face confirms my thought. He’s in a better place.

I sit down as far away from the sleepers as I possibly can. I don’t want to disturb them, nor do I want to be disturbed right now. I need to straighten my thoughts and focus.

Let’s go back to the beginning. In order to make some useful predictions and formulas to enable non-intuitive deductions and inductions the foundation of the science has to solid rock. I can guide my intuition with a simple example. I have two software programs. They both do the same things. They were developed by two teams for the same purpose. They could be anything, like two identical word processors or spread-sheet programs or traffic light control programs or programs for operating a microwave oven. No matter how the programs were developed, they exist. They contain identical feature sets. They can both accomplish all tasks the other one can. What can we say about them intuitively?

Intuitively, if the two programs, program A and program B perform the same tasks, we can say that the sizes of their feature sets are the same. A feature set is the group of functions or tasks a program performs. We could call it the total functionality of the program. Functionality or features are the external effects the program can have. They are the output (in the widest possible sense) of the program. The features are measurable from from the outside. Features and functionality are without the program. Without an effect on its environment, the program has no meaning. If a feature can’t be measured or tested, it doesn’t exist. It’s as simple as that. Whatever a program can influence in its environment belongs to its feature set. External effects of a program are its output.

Let’s be more specific about this. If the (total) output of program A, let’s call it OA is the same as the output of program B (OB) then both programs perform the same functions and we can say that the outputs are identical. But we know intuitively that the implementations of the two programs can not be identical. The programs were developed in isolation and for any non-trivial program, there are almost infinite number of possible ways of implementation. The two teams could have used different programming languages, which would certainly make it certain that the implementations aren’t identical. This adds the concept of input into our scientific worldview of software. We’ll use IA for the input of program A and IB for the input of program B. The input can at this stage be anything. What I have in mind has something to do with the source code, the tangible input, but I’m sure the definition of input has to include resource files, possibly the tools used to generate the program and therefore also the environment has an effect. It isn’t clear at the moment, whether the software developers are part of the input or not. There is Ignorance about the details must not stop us now, though.

If both inputs and outputs were identical (IA = IB AND OA = OB), we are looking at the same program in both cases. The programs are identical. But this is no conclusion at all. What we want is to be able to compare two different programs. The outputs and inputs have two sides to them, perhaps we could call them dimensions even. In physics, in order to model the three-dimensional world we all live in, they use vectors. Vectors are useful little buggers, because they contain more information than just a magnitude like scalar values. Vectors also have a direction. The length of a vector shows its size, and sometimes that’s enough. I’m sure both input and output have many dimensions, and they would be best described as vectors, but can’t we do anything without the dimensions? Sure let’s just take the magnitudes and see what kind of conclusions we can draw. To get the magnitude of a vector, we’ll use vertical lines around the vector. Velocity is a vector, and its magnitude is speed. My train did reach a maximum speed of 125 km/h but to express velocity I’d have to add that it was heading east. In other words the maximum speed of the train, the magnitude of its maximum velocity (vmax) would be expressed: |vmax| = 125 km/h.

Let’s take any two programs, program A and program B. This time they don’t have to do the same things, this time we might be comparing a word processor to a microwave oven control software. If the sizes of the inputs of both programs are identical, but program A has a larger feature set (|IA| = |IB| AND |OA| > |OB|) then we can say that the density of program A is larger than the density of program B. In other words, program A accomplishes more with less.

On the other hand, if the outputs are identical in size but program A uses less input (|IA| < |IB| AND |OA| = |OB|), once again its density is higher than that of program B. This seems intuitive. Density is, without worrying about the units or possible coefficients, proportional to the ratio of output to input. In physics the Greek letter ϱ [rho] stands for density and proportionality is shown with this symbol ∝. To say that density is proportional to the ratio of output and input, we’ll just write:

ϱ ∝ O / I

Density is a scalar, it has no direction. I should have used the magnitudes of input and output because they are vectors, but I left the vertical lines out for clarity.

The density of an object in the real world is defined as the ratio between its mass and its volume.

ϱ = m / V

From this we could draw the conclusion that the mass and output of a program are proportional to each other and the input stands for the volume of the program. This is intellectually pleasing and intuitively correct, but we can’t put in any units or numbers just yet. For now we’ll have to settle for the conclusion that the mass is proportional to the size of the output of a program:

m ∝ |Osw|

and that the volume of the program is proportional to the size of its input:

V ∝ |Isw|

That’s it. There’s no need for a “mental-mass”. I can just use the mass as is to denote the external effects a program can have. Mass is linked with the concept of weight in the real world and it seems fairly reasonable to say that the more you can achieve with a program or application, the more weight it has. You can talk of real heavyweights, at least metaphorically, when you’re talking about the big and powerful applications. Small utility programs have small but specialized feature sets and it’s not disparaging to call them lightweights.

Labels:

Friday, March 14, 2008

SofSW: The SW Basics (2/6)

Everybody else scrambles to the escalator down to the departures hall, but I go against the flow. I know that there’s an elevator and nobody else is following me. The elevator is up, and as I press the button, the doors open right away. I enter dragging my suitcase behind me. I turn and see only backs. I press the button for down and the doors close. Few seconds later they open again and I can join the flow of people from the escalator.

The departures hall is massive and the crowd quickly disperses. The ceiling is at least thirty meters high, there are massive advertisement sheets hanging from it. They tell you about cheap flight options and big building companies, there’s even an ad from the local power company hanging far to the right. The hall is massively wide too, it seems to go on and on in both directions. Fifty meters in front of me on the opposite side of the building, there are the check-in desks. Each desk is numbered and the one just opposite me has the number 115. There are rows of TV monitors close to where I’m standing and to the right and left of me. I can see more people entering the hall from the doors next to me. There are all the time taxis parking outside, leaving a passenger out and continuing. Next to the glass elevators there’s a rectangular opening with railings around it. Through the three times three meter opening I can see downstairs. There’s the arrivals hall. Bored taxi drivers stand near the meeting point with signs on their hands, looking hopefully at each passerby. “Maybe this is Mr. Ching from Hong Kong. The flight landed twenty minutes ago. Where is he?” “What’s holding up Mrs. Semathier? I wish I had her number.” Some drivers even talk to the passersby like they were trying to convince them of being Mr. Ching or Mrs. Semathier. After a long flight, it is understandable if a foreigner doesn’t know how to read the sign. Maybe they’ve even forgotten their name because of the exhausting flight. Saying the name out loud, no matter how mispronounced it may be, just could wake them up and make a dead-tired traveller remember they are actually Mr. Ching from Hong Kong and not Bruce Tiller from Australia. But why is that driver talking to the male passengers and asking for Mrs. Semathier? Does he really believe that they’ve had enough time on the flight to perform a sex-change operation and recover enough from it to walk through the arrivals hall unaided. The anesthesia would explain forgetting one’s name, but how would the driver explain the men’s clothes former Mrs. Semathier is apparently wearing? Amused, I get back on track.

I’ve been here before and I know how it goes. I’ll first check the monitors for the check-in desk number allocated for my flight, then I’ll queue to the check-in desk and get rid of this suitcase. Then with my ticket I can go through security check and head for the gate to wait for the plane. There are eight TV monitors organized in a two-by-four arrangement. They list all the departing flights sorted according to their times of departure. Each flight is described with the destination city, the flight number, the departure time according to the timetable and the numbers of the assigned check-in desks. There’s also room for a comment about possible changes like delays or cancellations.

New York US345 11:35 115-125
Reykjavik SK176 11:35 214-220
Frankfurt TD876 11:40 183-185
Malaga FG034 11:40 91
Milan LK999 11:45 12-19 delayed until 12:10
Mental-mass IS879 11:50 555 wrong
Stockholm LH675 11:50 34-54
Hong Kong KA018 11:55 106-112

My flight is supposed to leave at 12:15. What did I see? There are two planes leaving at 11:50, one to Stockholm and another to ... Mexico City. Was that there before? Didn’t it say something else? No, apparently not. Aah, there it is, that’s my flight number, departure time is correct, 12:15, there’s no mention of a delay and the check-in desk is any desk between 67 and 75. To the right then. That’s the descending direction of check-in desks.

There are two people in the queue I choose. The other queues aren’t any longer, my flight destination doesn’t seem too popular. If the lines had been longer I would have used the automatic check-in machines, they are really handy, but now there’s no need. Two minutes later, it’s my turn.

“Hello, here’s my passport and my ticket.”
“Thank you, sir.” says the dark-haired check-in lady. She’s wearing the dark blue uniform suit like her colleagues on the neighboring desks.
“Would you like a window seat or aisle, sir?” she asks.
“Window, please”
She taps the keys on her computer terminal.
“Do you have just one piece of luggage?”
“Yes, just one.” I tell her and put my suitcase on the band. 20,2 kg say the scales. I know the limit is 20 kg but I also know that she won’t complain about such a small difference. Sometimes two kilos is no problem.
“Do you know that your mental-mass theory is absolutely wrong, sir?” she says suddenly and looks at me awaiting answer.
“Sorry?” I say, amazed! How could she know? I’ve just thought about that whole concept in the train. Nobody can know. She CAN’T know.
“Do you know that the meal on this flight is absolutely delicious, sir?” she repeats, probably notices the horror on my face and continues, “Nothing to be alarmed about. The meals are always delicious, but this week we have a special offer as our airline is testing new cuisine alternatives. Everybody, even in economy, will get the food meant for business class. This way we get a wider amount of opinions and can later serve business class passengers even better. You can consider yourself lucky, sir.”
“Oh, yeah, thank you.” I manage to mutter as I grab my passport and my boarding pass.
“Your flight leaves at 12:15 from gate 75. Have a pleasant flight!” she says and points to my left indicating the shortest way to the gate.

I’m a little shaken as I leave the counter. Am I hearing things? Is all this a little too much for my brain? Is this piece too big for me to chew? First the monitor and now the check-in lady. It must be my subconscious telling me something. What was the message? “Mental-mass is wrong.” What if that is true? Should I start over? I need a place to think and this departure hall is not the place. There’s too much noise, too many people, too many distractions. It will be much quieter at the gate.

Labels:

Sunday, February 24, 2008

SofSW: The SW Basics (1/6)

You never know exactly where you are as you leave a train. You know you’ll be standing on the platform, but the way to the station might be in either direction. I stand with my luggage on the platform lost for a moment. Once I reach the right state of mind I start looking for the right station of mine. I have two choices, the escalator or the elevator. I see the elevator to the left of me and head towards the group standing in front of it already. These half-a-dozen strangers were on the same train as I just a moment ago. Half-a-dozen travelers equals five suitcases; three on wheels, two being carried; and one backpacker. The elevator arrives and the six suitcases and one backpack enter it with their custodians.

A pair of girls discuss the trip ahead, but everybody else is quiet. We don’t know each other, we need nothing from each other, there’s no need to communicate. In fact, we all seem to prefer not to communicate at all. I certainly don’t need any distractions now, I know exactly what I am to do and how I am going to achieve it. I need to get to airport terminal as directly as possible. I am in no hurry, but there’s nothing else to do here either. When seven people are crammed into a closed space and five of them don’t want to signal anything, not even accidentally, the results are hilarious from any outside observers. We try to find something to look at that attracts our attention, but isn’t human. Some of us look at the ceiling and the digital display showing a one changing into a two. Such excitement, who would have guessed that as the elevator ascend from level one to another level, it would be called level two? Some of us turn our heads downwards trying to catch glimpses of shoes or luggage or whatever that could hold our imagination without seeming completely awkward. I choose to look at the luggage of my closest standing perfect stranger. His suitcase is black, with a grey band going around it under the handle. It seems to have a three-digit combination lock. I can’t quite make out the numbers, but I can’t help wondering if the combination would open the lock. I try to remember to shuffle the numbers of my suitcase when it is closed, but sometimes I forget. The mystery of the combination lock won’t be revealed to me and I feel like somebody’s staring right at me.

The feeling is very strong, but as I turn my head upwards, I can’t see anybody looking at me. Did that man in the corner just avert his eyes or has he been looking past me all the time? Behind me there’s the metal-colored wall of the elevator, nothing special. He doesn’t seem to be thinking, although that is hard to tell from outside. He seems to be looking at something, but there’s nothing behind me. Why would he stare at me? Is my collar funnily, do I have something on my face? I made some notes with a ballpoint pen, maybe the ink leaked to my fingers and maybe I’ve rubbed my face with the hand and didn’t notice that it is smeared blue. I check my hands. There’s no ink anywhere. I’ll have to check my face in the mirror. I could have rubbed all of the ink on my face. That would be the worse case. Not having any evidence to suspect it, but having a maximum amount of ink on the face. That would be embarrassing.

After an eternity of uncomfortable silence, with only two girls talking about ordinary, everyday things, the elevator arrives and the large metal doors open. The elevator regurgitates its passengers in one deep sigh and the race is on. Everybody wants to go the terminal as straight as possible and there’s no need to slack behind. I take my part seriously and overtake a few of my ascended acquaintances in the first curve out of the elevator. The roar of the suitcase wheels echoes in the hall. More suitcases and people stream in from the escalators. Overpacked suitcases make ear-screeching noises as the bearings on the wheels are subjected to extreme pressure as the cases are being dragged by their owners. A man with a green overcoat and stripy pants cuts in front of me and I have to stop to avoid a collision. A pink cap just wobbles one side to side as the man’s back moves further away from me. I speed up again to not let anybody else take the advantage and fill the empty space behind Harlequin Huey. I think I see the Staring Man to the right of me, but I can’t be sure. We all reach the Airtrack terminal.

The Airtrack is a small train taking passengers from the train station to the airport for free. There are two trains and two tracks. The tracks are suspended on fifteen meter high pillars and the trains are hanging from the track. Hence the name Airtrack. The trains are always moving to opposite directions on this 7-minute track. There are thirty seats on the train and room for another thirty or so standing. I wonder if all of us will fit into the next train. The train arrives and, sure enough, fifteen people or so are left waiting for the next train. This one idiot in a white cotton suit and white leather shoes wants to absolutely fit in with his two large suitcases and his enormous backpack. Pushing and shoving he almost gets caught in the automatically closing doors but eventually they close. People standing in the aisle are holding on to the nooses from the ceiling and they have to adjust themselves to fit the Great White Traveller better. The train starts and a backward surge goes through the passengers. Nobody falls and the mass of perfect strangers desperately look for something interesting to gaze at. The Airtrack is generous in this regard. There are windows through it in every direction. The scenery changes, there’s a motor-way to the left of it and some fields to the right of it. As we turn to the right, the motor-way is replaced by a parking house and the fields covered by airport buildings. There’s catering services, some large oil containers, hundreds and hundreds of parked cars. Now the runway comes into view with some helicopters parked near the fence on the grass. An airplane is rolling on the runway gathering speed and before it has time to take off it disappears behind the terminal building. The train comes to a halt, the automatic doors open and the crowd manages to leave the train in a more or less orderly fashion, one by one.

Labels:

Monday, February 18, 2008

SofSW: The Basics (2/2)

The bearded man returns to his seat. Five minutes ago he left his seat and went to the restaurant cart. I can deduce it easily from the 15 centimeter long sandwich he is holding. He sits at a distance of about a meter and a half from me and I can smell his fresh bread. Suddenly I’m hungry. I fight the urge to go to the restaurant cart, I don’t have the time anymore. I planned to eat at the airport and according to the schedule it can’t be more than seven minutes now. But we were seven minutes late at the last station, if the train hasn’t managed to catch up at all, it might still take fourteen minutes or more. Nobody has ever starved in less than half an hour.

The airport is located 45 kilometers from the previous station and the travel time according to the timetable is 27 minutes. With a piece of paper and a pen I make the average speed of the train to be exactly 100 km/h. The train has 15 carriages, each about 20 meters long and there’s the engine. Assuming it is as long as each carriage, the whole train from the front of the engine to the end of the last carriage is 315 meters long. Assuming that there’s a meter of empty space between each carriage and the engine, we’ll need to add fifteen meters so the total length of the train is 330 m. Let’s say that you’re standing at a platform and looking at a beautiful girl on the next platform across the railway. She’s absolutely fine looking in her short skirt and tight shirt. She has long hair that shines in the sunshine and you’re sure that if you could see her eyes, they would turn out to be perfect in a perfect face. If she saw you staring and at the same time the train would go past on the track between the platforms without slowing down with an average speed of 100 km/h, she would have only twelve seconds to run away and disappear. She should really hope for a train that was stopping.

The basic measurements of the physical universe are simple to use and understand. They help to grasp the nature and its phenomena around us, but what about the immaterial universe? Now I don’t mean the spiritual world, which only exists in the imaginations of people, I mean the world of software. It is a strange universe of ideas and reality, of formlessness and function, of thought and implementation. In the world of software, immaterial ideas are turned into programs, which can produce extremely tangible results in the real world. What do we have to help us grasp this mostly mental meta-world of mind-artifacts? Not much.

Software as an industry has been around for less than a century and is one of the youngest areas of industry. It has evolved a lot since the first computers and every now and then there have been great revolutions so that a new generation of programmers has started making its journey on fresh ground with new thinking and considerably more power than the previous one. The situation now is that the reigning programming languages have been around roughly since the nineteen seventies. Clearly the most popular programming languages is called ‘C’ and the object-oriented languages of today - C++, Java and C# - are really offshoots of C. But I don’t want to think about programming languages. Not at the moment at least. I want to think about the basics of software. What would be the equivalent measurement for size in the real world? Software doesn’t have a mass, but is there something equivalent to the concept? What about time?

A program is usually written as text in stored in a file on a media readable by a computer. The text has a specific form that it needs to have in order to work as expected and all that is defined in the programming language definition. That matters not at the moment. The text files written in the programming language form the source code of the program. There has to be at least one file for a program, usually there are several. Biggest programs consists of thousands and tens of thousands files sprinkled in the branches and leaves of a complicated folder structure. Just finding the right source code file is sometimes challenging, but the challenges truly start when we start looking in the source code files themselves. Each file consists of lines of text, which many tools like compilers and preprocessors need to read and process. The tools aren’t important yet.

If we compare two programs, and especially their source code, there are obvious differences. The lines in the files are different, with a few exceptions probably, even some files maybe duplicated between the programs, but mostly the source code files are unique. We could perhaps use the size of the source code files as a basic measurement in the software world. Let’s try that. Let’s define that a length ‘l’ refers to the size of a source code file in characters. Characters are the atoms of text, they are indivisible, the smallest ingredients of text. In that sense this definition would actually be closer to the definition of mass ‘m’ than length ‘l’. Mass could be defined as the sum of the atomic masses of each atom present in the object. Length refers to its one-dimensional shape. It doesn’t work that well. Good. Failed ideas can work as seeds for new ones. Once you realize an idea won’t work, you can discard it and move to looking for the next idea. It’s bad to try and work with an idea not realizing that it won’t work. The longer you keep banging your head against the wall, the more likely it won’t work properly later.

Maybe the level of abstraction is wrong. Maybe the physical dimensions of a source code file have no meaning. But that can’t be. Two files, one twice as long as the other, both implementing the same functionality are different. Yet they are the same. We need to have a unit that shows that. The simple idea is to use one unit for the size of the file and another for the intellectual content of the source code file. These can either be two different units or two different dimensions. Is code one-dimensional, two-dimensional or three-dimensional like Matrix wanted us to view it?

For now, I’d like to separate the concepts of material size and intellectual size. Let’s use length ‘l’ to refer to the material size, or file size, i.e. the number of characters in it. The intellectual size would be equivalent to mass ‘m’ and let’s call it ‘mental-mass’. It refers to the number and size of ideas implemented in the file. We’ll have to define it more carefully later, but for now let’s imagine that each statement in the source code file is part of an Idea and has some mental-mass. A whole idea will have a mental-mass that is the sum of the mental-masses of all the statements that comprise it. Now we can say that two programs can be equal in mental-mass but differ largely in size. This is a start.

There’s no more time to think further, the train is arriving at the airport station. I pack my stuff, put on my jacket and leave the train. I have to squint a little as the platform is bright in the sunshine and my eyes are used to the dim indoor lighting of the train.

Labels:

Friday, February 08, 2008

SofSW: The Basics (1/2)

We’re waiting for the train to leave the station any minute now. I glance at my watch and notice that we’re three minutes behind schedule. I know that because the display on the platform is clearly visible to me and it is showing the details of my train. Three minutes isn’t much, but when you have a complex network of trains and other forms of traffic, air planes, trams, busses, and in this network you have individual people with their dependencies, it all hangs together. Some of the dependencies are critical and some can be adjusted. There are trains that will wait if a connecting train is arriving slightly late. Some things, like airplane schedules are however not under the control of the railway company. In order to keep everything in sync, everybody wants to stay on schedule. Time passes relentlessly and the train is still standing on the platform. Five minutes late. I see no reason for the delay. Most importantly, there is nothing I can do about it. So, I leave it.

Time is one of the basic properties of the universe we live in. Time is one of the most important concepts there is in physics. You cannot explain time with other means. It just exists and affects the world. Its unit in the International System of Units, Le Système international d’unités, short ‘SI’, is second, abbreviated with the letter ‘s’.

In the beginning of time, or more specifically, in the beginning of time measurement, people used to be concerned about the seasons. It made all the difference for survival whether you sowed in the spring or in the fall. In addition to seasons there were other interesting periods. The period of the moon waxing and waning gave us the month, and the sunset and sunrise define night and day. As science progressed, sundials became all the raze. They measured the apparent time during the cloudless daytime. It took several hundred years before mechanics had advanced far enough to allow for pendulum clocks. It was not until the seventeenth century that a seconds pendulum was first added to a clock. All the time the definition of time depended on Earth’s rotation either around its own axis (day and night) or its rotation around the Sun (seasons). Astronomical observations were the basis of time.

The name ‘second’ comes from ordinal numbers. Already in the thirteenth century a medieval scientist called Roger Bacon expressed times of full moons with hours, minutes, seconds, thirds and fourths. The other fractions have been mostly forgotten, but hours, minutes and seconds stick. Second is so short a time that it is a secondary unit in practical life. It finds use in sports, but even there more accuracy is needed. The second comes second in almost everything these days, only as the official unit of time it gets its worthy first place. Nowadays, the definition of a second has moved from the highly imprecise astronomical observations of large systems to the extremely small world of atomic clocks. A second is defined as a certain number of vibrations of a particular atom. Even that measurement isn’t infinitely accurate, but for all practical purposes the second is defined far too well for its insignificance in use.

Seven minutes late the train leaves the platform. I still don’t have a clue as to the delay. Maybe we were waiting for a connecting train, which is behind another train on this large station. When you have sixteen or more track it’s hard to keep track of each one.

Now that the train is moving, I can feel the acceleration in my back. I sink in my seat as the speed of the train grows from the initial zero to 20, 30, 50, 76, 98, 123 kilometers per hour. The display in the carriage shows the current speed every minute or so. Now that the speed is constant, there is no more pressure on my back, the acceleration is gone. In fact, we have reached quite some conclusions already. We should back up a bit to start from the beginning.

Distance between two points, or the length of an object is another basic property of the universe. We use the meter to measure it in Europe, although the strange island folk in Britain insist on their own peculiar system of inches, feet and yards. They are peculiar because they aren’t decimal. In the metric system, almost everything is divisible by ten. One meter is ten decimeters, one decimeter is ten centimeters and one centimeter is ten millimeters. On the other hand a kilometer is thousand meters and so on. But if you take an inch as your basic measurement of length, you’ll have twelve of them in a foot and thirty six of them in a yard, which gives you three feet in a yard. There are two yards in a fathom, which is equivalent to eighteen hands. As you can see, there are many different names for the units and the conversion factors are all different. It seems totally incomprehensible if you have learned the metric system first.

Measuring length between two points is a one-dimensional measurement. The basic SI unit meter, abbreviated ‘m’. If you want to know the area of your field as a farmer, you’d measure each side separately and multiply the numbers. The unit of area, measuring the size of a plane is m*m or m squared, usually written m2. Measuring the three-dimensional volume of a rectangular object is as easy as measuring its three sides, the width, the height and the depth, individually and then multiplying the result. The unit of volume will be m*m*m* or m cubed, usually written m3.

You can combine the basic measurements to understand more from the universe. There is almost no limit to the combination you can build on top of these basic measurements of distance and time. For example, the average speed of the train is just the distance travelled in the time it took. And the acceleration I felt so clearly a moment ago in my back is just the change in speed over a certain period of time. The faster the speed changes, the higher the acceleration.

Oh, and we shouldn’t forget the third basic property of most objects in the universe: the mass.

Labels:

Friday, February 01, 2008

SofSW: The Background (3/3)

On the other side of corridor sits an old man. His beard is black with blotches of white like a negative dalmatian. His eyes are closed, he seems to be dosing off exhausted. Hid jacket is worn, not badly, but clearly used for years. His grey trousers are slightly too short for his legs and I can see his white socks. He’s been traveling long, even in his sleep he is holding on to his backpack which is on the window seat next to him. Experience I guess. I wonder for a while the kinds of adventures he must have had on his life’s journey. Did he find what he was looking for? Was he looking for something or has he just lived his life? He’s a traveller, he must have been looking for something. He has actively done something in his life. I can see from his peaceful and slightly wrinkled face that he it hasn’t always been easy. If he had a goal in mind, clearly he hasn’t reached it yet. But he seems happy with himself regardless. The search keeps him going.

The loudspeakers announce the next station and people start putting away their books, putting on their jackets and reaching for their bags overhead. Soon the corridors are filled with leaving travelers. This is a big station but it’s not my stop yet. I notice the man on the other side of the corridor rears but doesn’t wake. I hope it’s not his stop either. For a while I think of the pack of hyenas standing eagerly on the platform. I can them blocking these disembarking people for a few seconds. It is like the tide, regular, inevitable, observable but not necessarily easy to explain. If you think about it in a cool and logical fashion, it need not happen at all. Yet it does, every time the train arrives on a crowded station.

In my mind I am happy that the bearded man continues his journey. It is somehow safer to have company on this trip. I can’t explain my feeling. I’m not in danger, I have an exciting adventure ahead of me, yet the sight of a familiar face, even of a complete stranger, is reassuring. It’s proof that I haven’t driven past the final station yet. After the final station, the Terminal Station, the empty train rides on to the service yard for maintenance. Nobody’s allowed to be onboard then. I have a mortal fear of passing the Terminal Station without noticing. An experienced traveler like the bearded man wouldn’t do such a simple mistake. I’m relieved.

A boy on the corridor has problems carrying his bag. Overpacking is inexperience. For shorter trips like the one he seems to be destined for by the looks of his carelessly tied shoes and open jeans jacket, it’s not too big a mistake, but it does make traveling unnecessarily uncomfortable. You’re less likely to take longer trips, have exciting adventures, if even the shortest trips are too exhausting. Overkill in packing kills the joy of traveling. It is deadly for experience. Unless the boy learns his limits soon he is going to start restricting his life by traveling less. He’s going to be staying more where he already is. He is going to have to find the solutions of his life, his education, his job, his wife, his friends and his opinions in neighborhood he lives in. Unless he learns his limits, he is just going to limit himself more until he has no choice. Is that where the bitter old men at bars complaining about their lives come from? Even with a cool glass of beer in front of them they are complaining. It’s like it’s bitter instead of lager. Ignorance of one’s own limitations has taken their freedom and the lack of choice is slowly strangling them. You hear it in the gravel in their voices, the pressure of the lack-of-choice rope. With every glass of beer they are shoveling the gravel on their own graves. As the queue on the corridor starts moving, I glance at the boy’s face. He’s young and there is a certain something in his eyes. The glint of enthusiasm, of not having given up yet, is clear to see. If he manages to maintain it, he’ll be fine, I think warmly when he disappears from my sight forever. New passengers fill first the corridor, then the available seats and again the corridor. The train is absolutely packed and the journey continues.

I am not the first one embarking on this kind of journey, I probably won’t be the last and I’m pretty sure I will never arrive at my final destination, although I am certain that the journey will have an end.

Labels:

Friday, January 25, 2008

SofSW: The Background (2/3)

I am excited about what is to come. I’ve been to this train a hundred times before, but it always excites me. I think it is the promise of adventure. Every trip I take has a hint of adventure in it. This one is filled with unknowns. I feel exhilarated.

I felt exhilaration when I encountered computer science for the first time. I had played with a home computer before. My father bought me a rubber-keyboard Spectrum 48 in the UK and I used it to play some games on ordinary C-cassettes. I even got some books with listings of program code and I used to type several page long listings on those rubber keys for hours and hours in order to see what would happen. Once I had done the typing correctly I could play the game as long as I wanted, but when I turned the power off, it was gone. I had no way of saving the work. I don’t remember experimenting with the code, however. I don’t think I ever thought about it as programming or ever understood for real what I was doing. I was just mindlessly copying strings of characters that formed magical spells that would allow me to play a game with amazing graphics. Some of the games even used colors. My friends had other home computers, which were all used exclusively for playing games. Vic-20, Commodore 64, Amiga all bring fond memories of playing sessions with my long-lost friends.

Several years later, in the university of technology I bumped into computers again. The feeling that I had had with my Spectrum came back to me. I had perhaps never understood the concept of programming but it had felt right nonetheless. It was something I was willing to devote hours and hours of my time to, there was just something there. I think the cold logic behind it all must have been visible to me. This time, however, I was going to learn to program and to understand it. This time the computers would be able to save my work and I wouldn’t have to complete it all at once. I could start with a piece, save and continue after resting. If I had made an error earlier, I could fix it later. I spent six years in the university of technology majoring in computer science and the grip of logic tightened. Logic was my world. Although I now can say that I love logic, such strong feelings couldn’t have been further from my field of interest. Following logic requires no emotions, but even Mr. Spock - a creature of pure logic - softened as the original Star Trek series went on.

Many of my friends seemed to have more previous experience with programming and I felt threatened by it. What if I couldn’t understand something, what if I couldn’t learn, what if I couldn’t catch them in my studies? Some of this fear made me study even harder. I got a programming job during my studies, which helped me put the theory I was learning into practice.

Now, a decade later, I suddenly found physics again. This time it was packaged as video lectures available for free in the internet, which I used extensively years before any of my relatives even heard about it. The access to email and the internet was one great advantage of studying in a university of technology. The video lectures showed a professor of Massachusetts Institute of Technology (MIT) presenting physics to the students. It seemed so very familiar and clear. The professor used a very fluent style of lecturing. He first described a theory and then made some predictions based on the theory and then conducted an experiment, always observing the predicted result to a reasonable margin of error. He showed that “physics works”. This core idea of scientific study of making a prediction and then trying to observe it finally gave me the idea of trying to explain the immaterial world of software in a similar way. The way you can create new theories on top of old, familiar ones and by mathematically “massaging” well-observed formulas arriving at new completely non-intuitive formulas which however produce observable predictions is a fascinating one. What if we could predict some properties of software just from some of its intrinsic properties? I won’t be able to reveal all the secrets of software, but just trying is certainly going to create some new insights. What if there was a formula that would predict the effort needed of adding a feature into a piece of software? What if we could calculate the quality of software? There might be a totally non-intuitive relationship between number of errors and the average length of lines in the source code.

Labels:

Tuesday, January 22, 2008

SofSW: The Background (1/3)

The display hanging high above the platform shows a slight delay in the arrival of the train. The loudspeaker announces the delay in its customary incomprehensibly distorted voice. The loudspeakers make the railroad platforms seem the most anti-acoustic places in the world. Or maybe the railroad companies don’t care about sound design, maybe the low price of the speakers is enough. A train approaches. The people on the platform start nervously packing nearer and nearer to the rails. They seem like a pack of hyenas to me, all looking for their own interests. At the same time they present group behavior, which is clearly predictable. I decide to stand back and won’t move until the train has come to a full stop. I know that it will still take time for the doors to open and for arriving passengers to disembark the train. The train comes to a halt and sure enough the pack of hyenas is blocking the way of the out-coming passengers. The pack has to move and the passengers get off. As soon as the doorway is clear, the pack attacks it and compresses through as if the train might leave at any moment without any consideration to the embarking passengers. The trains aren’t that automatic. There’s a conductor overseeing the boarding and he signals to the engineer when the platform is empty and all passengers are on board. The hyenas have boarded now so I join them and climb aboard the train.

There are two floors and with my luggage I decide to go for the lower one. I find an empty seat, take my jacket off, even though this is only a half-hour trip, but I like to make myself comfortable. I place my suitcase behind the back of my seat and sit next to the window. I have the earphones of my music player on, but I’m not listening to music. I want to think.

The sun is shining through the window. There are lines of dirt on it, horizontal effects of high-speed. The city looks alive as the train leaves the station and crosses the first bridge. The windows of the houses are like eyes. I can see the souls of the apartments with a glance and as the train speeds up, the souls start to swish on by. As we leave the city, the amount of green grows. First there are trees among the houses, and bushes, slowly the houses go into minority and finally the green takes completely over. There are fields of green bright in the sunshine. There’s not a cloud on the sky and I turn my gaze inward.

Labels:

Wednesday, January 16, 2008

SofSW: The Departure (2/2)

When traveling, there are three ways to pass time; entertainment, gathering input or production. Entertainment is the easiest solution, all I need is a good fictional book or comic and I can almost forget that I am traveling. I consider travel time my own time and I get to decide what I do with it. My music player comes in handy in providing a lot of entertainment. There are about 240 songs from my extensive over six-thousand song collection on the player and I always play them randomly. I never know which song is coming next but I always know that it is a good one as it comes from my own collection. Why would I need more control? When I resort to entertainment and to music specifically, I like to let it affect me and my mood, not vice versa. Upbeat songs make me happy and blues makes me pensive. Sometimes I might even become a little sad because of a beautiful but tragic song, and I thoroughly enjoy the feeling. It is temporary anyway. The next song is going to take it away. I know people who make playlists of songs based on the feelings they inspire. They might have a list of sad songs, which they play when they are already feeling blue. Or maybe they play only happy songs if they are down, I don’t know. I don’t want that kind of control over my feelings. When I’m feeling really depressed I sometimes wish that the next song would be a hero story about a tragic loser who against all odds wins in the end or about a rebel who keeps his head no matter what and is rewarded for it. They give me fighting spirit and if by chance one of those songs happens to play, I can forget about my depression. It is gone and I’m back in the game.

Inflight TV programs and movies are other ways of entertaining myself and I have been known to resort to magazines or menus in the seat pocket in front of me, if I was in the mood and had nothing else to read. Entertainment has its place mostly when I’m tired but not tired enough to sleep, or when the trip is too short for doing anything sensible, or when the environment is too noisy or disruptive for serious thinking. When I decide for entertainment, I go all the way. I use it to forget all my troubles, I deliberately avoid thinking about work. That’s the best advice I can give. Whatever you do, do it properly.

Gathering input means learning. While the value of entertainment comes from the temporary relaxation and escapism, learning is meant to provide longer lasting value. I usually carry one professional or non-fiction popular science book to fulfill my needs to learn. I have noticed that I can read books and not learn anything. I maybe remember reading a particular book, but after half a year or longer I can’t necessarily name any fact I learned from it. In order to become more effective in learning and not just using science books for their entertainment value, I have taken to making notes. Whenever I come to an interesting or thought-provoking passage in the book, I stick a small Post-It note on it so that it sticks just slightly outside of the edge of the page. I keep a small sample of these small Post-It notes on the first page, just under the cover. Whenever I choose a new book to read from my book shelf, I put a bookmark and a collection of stickers on the first page. After I’ve read the book, all I need to do is go through the stickers, copy the passage on my laptop, remove the sticker, place it behind the cover page and move on to the next sticker until I’ve gone through them all. When I get back to my book shelf, I move the stickers to the next non-fiction book. As a matter of fact, in order to collect interesting quotes and sayings, I use the stickers also on fictional books and sometimes even magazines. The file on the computer gets reviewed every now and then and reading the copied passages refreshes my mind. The learning intensifies.

I am a doer. I can entertain myself easily for days and weeks on end. I can go even longer without feeling guilty when I read good scientific books that teach me. But eventually the need to produce becomes overwhelming. If I don’t manage to find the time to write or draw or play guitar, I become extremely irritable and will explode with the slightest hint of resistance or criticism. To outsiders my behavior seems inexplicable. I seem to lash out unprovoked. To me it is a clear symptom of going too long without leaving my mark on the world. It doesn’t have to be anything others see, it doesn’t have to be popular. What it must be is something with lasting value. A drawing on paper is a physical object that can be shown or stored. A poem can be read out or stored on a website for random passersby to find. Playing guitar actually serves my learning purpose more but at least my neighbors get to appreciate the sounds I produce if they want. Writing in any form more lasting than a casual email is enough for me to feel having produced something. When I write a marketing letter from scratch, I definitely feel I’m creating. If the marketing letter happens to convince a customer, the creation has accumulated even more value. The peace of mind is the principal value for me, anything other is just a bonus.

I try to fill my days at home with a healthy mix of these three activity types, but traveling focuses the free-time. There is nothing else you can do. You have to choose one of them. Unless you decide to sleep or talk to your fellow traveler, which I hardly ever do. On this trip I’m going try something different. I’m going to talk to strangers and see if I chance upon pure entertainment or will I learn something of lasting value. A talk might even prompt me to make notes, which would definitely fit into the production category.

I am also going to think deep about software and science in general on this trip.

I was a typical good schoolboy. I did my homework and learned what was taught and did well in exams. I studied mathematics, took the longest possible courses in physics, chemistry and liked natural sciences very much. Maybe the only slight abnormality with me was that I was also very good in languages. This seemed to prompt amazement in my relatives and neighbors, who all seemed to think that boys are good in mathematical subjects (if at all) and girls do better in languages and somebody excelling in both kinds of subjects is exceptional. Later on in the university the gap between the hard mathematical sciences and soft humanistic subjects, like language studies, grew even wider. I know extremely gifted men who could solve the most difficult mathematical problems, but who would be out of their depth when asked to pronounce the word “la fille” on the French class. Mixing it with the culinary term “le filet” is bound to awaken some hilarity in the class.

After high-school I had spent two summers in Switzerland amazed by the strange German-like language they call “Schwyzerdütsch” or “Schweizerdeutsch”. I had studied German and being able to understand what the Swiss people were talking when even German people wouldn’t gave me enough confidence to skip further studies of German language and to get the credit I just did the exam. Having thus saved time from German studies, I took up French. I did a couple of basic courses of it, even though it wasn’t mandatory. That goes to show that I do like languages.

I remember the physics classes in the university of technology. The teacher looked like a hippie, although this was in the early nineties. I found physics fascinating, but little by little it seemed to lose on practical value. In the end I read physics in order to pass the exams and get the credit. I never imagined being able to use the learning in practice. But here we are.

Later on I found computer science and programming, which became a major part of my life.

You’ll have to excuse me now but I have to exit this bus and hurry for my train. On the train I’ll have more time to explain the basics of software engineering.

Labels:

Saturday, January 12, 2008

SofSW: The Departure (1/2)

Dream disappears like a wolf into the woods. I rise, switch off the alarm in my alarm clock just as it is about to go. I think it makes a little sound a minute or half a minute before but I’m not sure. On many a morning I’ve woken just before the alarm clock and the only other explanation I can come up with is that my biological clock is much more exact than I give it credit for. After all, usually I set the alarm in the evening and I know when it is supposed to go off. Maybe my subconscious wakes me up on its own. I guess it would be easy to test and set the alarm and listen for five minutes for any extra noises but I won’t do it. First of all, I have a feeling that the ambient noise level during the day will drown out little noises from the alarm clock. Secondly, I think that I’m more receptive to auditory input asleep than awake. It might be that even though the alarm clock did make an extra sound a minute or so before alarming, I probably wouldn’t hear it if I was paying it attention. And thirdly and by no means least, it is good to have some mysteries in life. It is after all a minor thing and a positive one for that matter to wake up at the right time without disturbing anybody else. It is a natural start for a day.

However, the nights I didn’t wake up before the alarm are hugely more numerous than the ones I did, so it might just be an indication that I’ve slept enough. The day ahead most definitely has an effect. Bad days, exciting days, scary days wake me up way too early. They seem to want to be nasty. Laying awake in bed, tossing and turning, trying not to think about the troubles of the following day and trying to fall back asleep is a guaranteed recipe for not falling back asleep and keep thinking about the troubles of the following day with a sleep-like stretched certainty and magnified evilness.

Good days, on the other hand like the one I’m having today, make you sleep soundly until it is time to rise. On dull and normal days, it is the alarm clock that wakes me usually in the middle of no dream. Good days - did I already mention that today is such a day? - start with an escaping dream. It is not necessarily a dream about escaping though. As the mind apparently can spin a year-long yarn in a few seconds with all its important goings-on in enough detail, it might well be that the dream I just had just started when the alarm clock made its alleged click. It then started to bring my mind back to the waking world and did it in the pleasant possible way with a fast-paced dream of happiness and joy. I no longer have any idea of its topic if it even had one, but the state of mind stays.

My state of mind fits my day. It is going to be a wonderful day. The sun hits my eyes as I open the curtains. I squint and head for the toilet. It is wonderful to feel pressure only on my bladder. I know I can relieve it soon enough. Physical pressure is often straightforward to relieve unlike mental. Today is a glorious day, there’s no pressure on me at all. In the kitchen, I fix myself breakfast. Eating a bowlful of cereals with milk and drinking a glass of multivitamin juice I read a comic to ease my mind into the real world. The breakfast is over before I know it and it is time brush my teeth. After a second visit to the toilet and a shower I’m ready to get dressed.

I have it all planned out, the clothes I’m going to wear today are waiting on the chair next to my bed. Black underpants, black socks, a black t-shirt with Mark Knopfler’s Shangri La album cover on it and black jeans are my traveling clothes on this fine day. I like to take it easy and although traveling is for some a luxury, I’ve done enough of it to dress casually and comfortably. I respect the other travelers and dress neatly but I’m not trying to impress anybody even if I am going to be moving through some very public places. I wonder if some people overdress because they like to show off or because they try to make others notice them? I decide what I wear based on my own comfort, I don’t let anybody else run my life. At least I do dress.

I have packed a little suitcase and it contains anything I going to need for a week. If I’m on the road any longer than that I’ll have to either buy new clothes (and a bigger suitcase) or wash some of them and re-wear them. The suitcase contains eight underpants, eight pairs of black or blackish socks, two pairs of sports socks, four black T-shirts with varying images, four blue shirts and grey trousers to wear on business days, a pair of black shoes, a toiletry bag with toothbrush and toothpaste, a mini-shampoo, a mini-shower gel, some cream for rashes, two band-aids, scissors for cutting my nails, a bottle of after shave, a deodorant stick (I never did get used to sprays), and a bottle of moisturizer. I have packed also the electric razor (I’ve never even tried shaving with a blade), a couple of books to read later, two pencils (3B and 4B), two graphite sticks (3B and 6B), a sharpener, an eraser and drawing paper, a charger for my mobile phone, a charger for my tiny music player which I’m already wearing, and an empty plastic bag for dirty laundry. I’m taking a small bag to carry as hand luggage. In it I have three books: a comic book, a scientific book and a novel. I also carry with me a notepad and a pen for making notes of anything interesting I see, hear or happen to think about. I carry my laptop computer in the bag too.

I go through the luggage mentally one more time, can’t think of anything missing and feel even better than before. Now there’s nothing stopping me, I am ready and eager to go.

Labels:

Sunday, January 06, 2008

Zen = Quality

In this post I want to explain my thoughts on two books I read recently. The first one is “The Way of Zen” by Alan W. Watts. It was written in the 1950’s. It is an attempt to explain, in English, what Zen is. It says itself that it is not possible to define Zen, so any attempt to verbalize it is going to fail. Yet that is the way of the West, so Mr. Watts gave it a try. He used many translations of texts and compiled a wonderful book of little stories, haikus and other zen poetry. As he can’t really say what zen is, the sense of the stories is not apparent. As a matter of fact, zen seems to be reached when you can answer incoherently to a simple and clear question. You just have to do it without thinking and immediately. There must be no consideration.

Somehow sitting around thinking without doing anything else leads to such a mental place. One of the places I stored in my story crumb repository was the wonderment of the Western people who ask how anybody can do anything good by just sitting around not doing anything. The answer given was that there seem to be enough people doing stuff already and it seems like a wise decision to stay out of it and not cause any more trouble. Muddy water clears best when left alone, after all.


Zen Dream by *RoieG on deviantART

The other book, which I read right after Zen is a popular classic from the 1970’s. It is written by Robert M. Pirsig and it is called “Zen and the Art of Motorcycle Maintenance”. It was the right kind of philosophy for me. It deals with the Western analytical thought. The framing story is a motorcycle trip in backlands of North America, but the real story is the hunt for Quality. What Quality is and how come we seem to have lost it. An additional things was that it seemed impossible to define, at least to the clearly capable but mentally labile main character.

The book made me think and as I attached a small post-it note at each passage of text I wanted to store, I quickly ran out of stickers. At some point I realized something, along with the main character. Zen was outside definition and I had some kind of idea of it after reading Mr. Watts’ book and now there it was, Quality, just like that outside of any definitions. It was clear to me that whatever Quality was, it was Zen. It is the attribute of an activity that is needed additional to plain work in order for the result to turn out good. Without Quality, you just have a product or a thing or stuff. With Quality, you have a useful tool, a productive team, an elegant solution or a beautiful result.

In another context, I heard a character in a TV series say “love is something you can’t define.” Was Love the same as Zen? Was Caring about the work the ingredient that added Quality to the work? I think it is. No matter what you call it, professional pride or perseverance in the face of trouble and adversity, I think Love is Quality is Zen.


1 Motorcycle by ~NutsnRaisins on deviantART

Does it do any good to have this insight? Indirectly it does, I think. As with all knowledge, the question is how you apply it. With the insight at hand we can see that the people most likely to do a good job - any job - tend to pay attention to it, are concerned for it and motivated to finish it with the best possible results. It doesn’t mean that you have to be a perfectionist, but it means that trying really to improve things every time can not hurt you. Actually, performing a quality job improves not only whatever it is you’re working on, it improves you yourself in the process. As a matter of fact, Robert M. Pirsig puts it very well in his book “Zen and the Art of Motorcycle Maintenance”:

Or if he takes whatever dull job he’s stuck with - and they are all, sooner or later, dull - and, just to keep himself amused, starts to look for options of Quality, and secretly pursues these options, just for their own sake, thus making an art out of what he is doing, he’s likely to discover that he becomes a much more interesting person and much less of an object to the people around him because his Quality decisions change him too. And not only the job and him, but others too because the Quality tends to fan out like waves. The Quality job he didn’t think anyone was going to see is seen, and the person who sees it feels a little better because of it, and is likely to pass that feeling on to others, and in that way the Quality tends to keep on going.
My personal feeling is that this is how any further improvement of the world will be done: by individuals making Quality decisions and that’s all.

It makes sense for your own sake to always strive for a genuine improvement. It is good physically, mentally, spiritually and socially.

The way the book is written, gave me an idea. What if I tried to explore some subject as a journey in this blog myself? The motorcycle trip across America is an easily understood metaphor and it makes for a great framing structure. I need to find my own journey, of course, but the main idea would be to describe the journey (of my life) and every once in a while dive deep into an interesting subject, trying to uncover the ultimate truth about it, all the while watching out for insanity. You, as readers, will have a great responsibility. You have to notify me, when you think I’m diving too deep into my thoughts and won’t have enough air in my lungs to reach the surface for another gulp. In other words, you’ll have to comment on my writings and tell me when I’m losing it. Warn me before it is too late.

The topic of my search will be software, software quality and whatever else pops up (that’s the trouble with any expedition, you never quite know what you are in for, otherwise there wouldn’t be any real discoveries) and the approach I try to take initially is traditional scientific method. I’ll first state the problem I want to solve, then I’ll write down some reasons or causes for the problem (the so called hypothesis), then I’ll design some experiments to test the hypothesis, predict the results of those experiments (notice emphasis on ‘predict’. It is a key ingredient of science to be able to say beforehand what should happen. There’s nothing mythical about that.), then I’ll perform the tests and observe their results and as a final step I’ll draw conclusions from the test results. That is the Scientific Method as described in Pirsig’s book, too.

I discovered a series of videos on the internet, which I find absolutely captivating. For the last two weeks I’ve been watching the video lectures of Physics from the Massachusetts Institute of Technology (MIT) Open Courseware offering. I’m currently following the Classical Mechanics course (8.01) at a rate of a lecture each day. Professor Walter Lewin makes each lecture lively and interesting by being enthusiastic and always having a more or less practical experiment up his sleeve. Not to mention the ever-changing pocket ornaments. On iTunes Store, there are two more lecture series Electricity and Magnetism (8.02) and Vibrations and Waves (8.03). I’m currently not doing any exercises, although I’m sure that would make the experience even more useful. For now, I’m happy to try and walk on an almost familiar ground. These are mostly things I was taught way back in school, and most of them I can at least vaguely remember and understand. Every once in a while it seems that Professor Lewin shows the matter in a way, which makes me understand it more deeply than I’ve ever done. That feels good. Before, I just wanted to watch the lectures because it pleased me. And as I was sick and traveling between Christmas and New Year’s, I had nothing better to do anyway, so I could get started. I had no clear value statement in mind. I didn’t know what for I would use my re-learned knowledge of physics, but I had the vague idea that I would find a use for it. It was clearly useful and valuable knowledge to have. Now the road is quite clear, I will approach the area of software (without defining it yet to software engineering, quality or whatever is supposed to be known by now.) as undiscovered territory and I will try and see if I can’t develop a kind of Physics of Software, just like we have the natural laws of physics that govern the universe. And just like chemistry is basically physics with useful shortcuts to hide many details, it just might be that I get to discover something like Chemistry of Software. Who knows, but I have to admit to being excited about the prospects. I'll label relevant posts with "Science of Software".


Code for Life by ~woraz on deviantART

I’m going to invent a traveling metaphor or similar to use as a framing structure for the rest of the narrative and go on discovering software as scientifically as I can as if it were terra incognita (unknown territory).

So please stay tuned, check back for how my journey is going and let me know if you want me to continue, or if there are errors in my thinking. Tell me if you don’t understand my reasons or logic, let me know if you have had an idea because of something you read here, generally comment just to show that you are following, it helps keep me going. And who knows what we’ll accomplish in the end.

I’d like to end with a French greeting, which puzzled me for some time until I realized what it really meant. Upon leaving a store or café in Paris, the people used to say “Bonne journée” to me and I was always thinking how did they know that I was traveling. Probably because of my accent (well, mostly my using of English, which clearly spoken isn’t an accent of French at all.), I thought. Until it dawned on me (by Virpi, of course) that they were just wishing me a “Nice Day”, not “Happy Trails”.

Anyway, without further ado, I’d like to wish us “Bonne journée!”


Wave Goodbye by ~beautifullyxchaotic on deviantART

Labels: